<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表格</title>
    <style>
        table{
            border-collapse: collapse;/*取消表格边距线条*/
            text-align: center;
        }
        .th1{
            background-color: rgb(247, 57, 24);
            width: 100px;
        }
        .th2{
            background-color: chartreuse;
            width: 150px;
        }
        .aaa{
            background-color: #999;
        }
    </style>
</head>
<body>
    <table border="1px">
        <tr>
            <th class="th1">表头1</th>
            <th class="th2">表头2</th>
        </tr>
        <tr>
            <td>11</td>
            <td>12</td>
        </tr>
        <tr class="aaa">
            <td>21</td>
            <td>22</td>
        </tr>
    </table>
</body>
</html>
